From: Sebastian Keller Date: Wed, 17 Feb 2021 00:07:38 +0000 (+0100) Subject: dnd: Remove pointless scale factor from restore position X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~314 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8edfe1dcf6d0c219862eeff0ecd1f1c7c1fd99ca;p=gnome-shell.git dnd: Remove pointless scale factor from restore position Since 629b7394 we don't use the preferred size anymore, but the original allocation, so this scale factor would always be 1. Part-of: --- diff --git a/js/ui/dnd.js b/js/ui/dnd.js index 0e972a13d..0af1e7ecc 100644 --- a/js/ui/dnd.js +++ b/js/ui/dnd.js @@ -661,15 +661,9 @@ var _Draggable = class _Draggable { if (parentWidth != 0) parentScale = parentScaledWidth / parentWidth; - // Also adjust for the difference in the original actor width - // and the width it is now (children of uiGroup always get - // allocated their preferred size) - const childScaleX = - this._dragOrigWidth / this._dragActor.allocation.get_width(); - x = parentX + parentScale * this._dragOrigX; y = parentY + parentScale * this._dragOrigY; - scale = this._dragOrigScale * parentScale * childScaleX; + scale = this._dragOrigScale * parentScale; } else { // Snap back actor to its original stage position x = this._snapBackX;